package com.holly.unit.bpmn.designer.exception;

import cn.hutool.core.util.StrUtil;
import com.holly.unit.bpmn.designer.constants.BpmnDesignerConstants;
import com.holly.unit.core.exception.AbstractExceptionEnum;
import com.holly.unit.core.exception.base.ServiceException;

/**
 * 类描述: 流程设计器异常类
 *
 * @author fxr
 * @version 1.0.0
 * @date 2022/5/7 10:15
 */
public class BpmnDesignerException extends ServiceException {

    public BpmnDesignerException(AbstractExceptionEnum exception, Object... params) {
        super(BpmnDesignerConstants.BPMN_MODULE_NAME, exception.getErrorCode(), StrUtil.format(exception.getUserTip(), params));
    }

    public BpmnDesignerException(AbstractExceptionEnum exception) {
        super(BpmnDesignerConstants.BPMN_MODULE_NAME, exception);
    }

}
